/**
 日历控件
 
 **/

#import <UIKit/UIKit.h>
#define CalendarView_ClickColor [UIColor colorWithRed:0.229 green:0.651 blue:1.000 alpha:1.0]
@protocol CalendarDelegate <NSObject>
@optional
//当切换月数时回调
-(void)changeMonth:(NSDate *)date;
//扩展日期的天数cell，第一个参数用于显示的UIButton，第二个参数是当前初始化的日期
-(void)exterlCell:(UIButton *)btn forDate:(NSDate *)date;
//当选择一个日期时调用该方法，可根据传入的UIButton设置选中时状态
-(void)selectedCell:(UIButton *)btn forDate:(NSDate *)date;

@end

@interface CalendarView : UIView
{
    NSInteger _selectedDate;
    NSArray *_weekNames;
}

@property (nonatomic,strong) NSDate *calendarDate;
@property (nonatomic,weak) id<CalendarDelegate> delegate;
@property (nonatomic) bool enabled;
//日历翻页到上月
-(void)lastMonth;
//日历翻页到下月
-(void)nextMonth;
//日历定位到当天
-(void)toDay;

@end
